<template>
  <view class="custom-navigation-bar">
    <view class="custom-navigation-bar-left" @click="back">
      <image src="https://th.bing.com/th?id=OIP.BKi_Yceh3feQeTJ26STj6AHaHa&w=250&h=250&c=8&rs=1&qlt=90&o=6&dpr=1.4&pid=3.1&rm=2" mode="widthFix" />
    </view>
    <view class="custom-navigation-bar-title">{{title}}</view>
  </view>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: ''
    }
  },
  methods: {
    back() {
      uni.navigateBack({
        delta: 1
      });
    }
  }
};
</script>

<style scoped>
.custom-navigation-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: uni.$systemInfo.statusBarHeight + 44px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.custom-navigation-bar-left {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-navigation-bar-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  text-align: center;
}
</style>